import re


# 转换为非贪婪: *?+{m,n}后面加上"?"

s="This is a number 234-235-22-423"
r=re.match(".+(\d+-\d+-\d+-\d+)",s)         # 贪婪
print(r.group(1))                           # "4-235-22-423"

r=re.match(".+?(\d+-\d+-\d+-\d+)",s)        # 非贪婪
print(r.group(1))                           # "234-235-22-423"